package com.csair.platform.cit.service.feignclient.sbcenter;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import com.csair.invoice.common.base.vo.JsonResult;
import com.csair.platform.sbcenter.facade.GdTaxUserApi;
import com.csair.platform.sbcenter.facade.model.login.GdTaxUserInfo;

/**
 * 拿当前登录税局的人信息
 */
@FeignClient(name = "sbcenter-service", url = "${sbcenter.api.url}")
public interface GdTaxUserClient extends GdTaxUserApi {

    /**
     * 根据员工号获取广东税局用户信息, 返回字段见 GdTaxUserInfo
     */
    @PostMapping("/getGdTaxUserByAccount/{account}")
    JsonResult<GdTaxUserInfo> getGdTaxUserByAccount(@PathVariable(value = "account") String account);

    /**
     * 自动登录，并且切换身份
     */
    @PostMapping("/autoLogin/{taxNo}/{account}")
    JsonResult<GdTaxUserInfo> autoLogin(@PathVariable(value = "taxNo") String taxNo, @PathVariable(value = "account") String account);

    /**
     * 获取登记序号
     */
    @PostMapping("/getDjxh/{yhid}")
    JsonResult<String> getDjxh(@PathVariable(value = "yhid") String yhid);
}
